﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<VideoBlog.Web.Models.CategorySummaryViewModel>" %>
<ul class="noborder">
    <% if (Model.Category != null)
       {%>
    <li class="title">Playlists in
        <%= Model.Category.CategoryName%></li>
    <% foreach (VideoBlog.Data.Entities.Playlist p in Model.Category.Playlist.OrderBy(o => o.DisplayOrder))
       { %>
    <li>
        <% Html.RenderPartial("Playlist-small", p); %>
    </li>
    <%}
       }
       else
       {%>
       <li class="title">featured Playlists
        </li>
        <%
           foreach (VideoBlog.Data.Entities.Playlist p in VideoBlog.Web.Helpers.ApplicationHelper.FeaturedPlaylists)
           { %>
    <li>
        <% Html.RenderPartial("Playlist-small", p); %>
        <div class="clearfix"><a class="highlight" href="/channel/<%= p.Category.CategorySlug %>/"><%= p.Category.CategoryName %></a><b style="float:right; padding-top:3px;">In:&nbsp;</b></div>
    </li>
    <%}
       }%>
</ul>

